Skip to content

Only try falling back to mkfifoat() if it is available#901

Open
ribbons wants to merge 1 commit into
RsyncProject:masterfrom
ribbons:have-mkfifoat
Open

Only try falling back to mkfifoat() if it is available#901
ribbons wants to merge 1 commit into
RsyncProject:masterfrom
ribbons:have-mkfifoat

Conversation

@ribbons
Copy link
Copy Markdown

@ribbons ribbons commented May 20, 2026

If MKNOD_CREATES_FIFOS is not defined by configure (such as when cross-compiling), mkfifo() is available but mkfifoat() is not then compilation fails since 30656c5.

(I discovered this when trying to cross-compile v3.4.3 for Android, targeting API level 21 which provides mkfifo() but not mkfifoat()).

This PR adds a configure function check for mkfifoat and updates the preprocessor conditional that wraps the call to it in syscall.c to reference HAVE_MKFIFOAT.

If MKNOD_CREATES_FIFOS is not defined by configure (such as when
cross-compiling), mkfifo() is available but mkfifoat() is not then
compilation fails since 30656c5.

Add a function check for mkfifoat and update the preprocessor
conditional that wraps the call to it to reference HAVE_MKFIFOAT.
ribbons added a commit to ribbons/android-rsync that referenced this pull request May 21, 2026
Compilation of v3.4.3 fails due to mkfifoat() being referenced but it is
not available on Android until API level 23 (we are targeting 21 and
above).

Add patch (submitted at RsyncProject/rsync#901
for the consideration of upstream) to test specifically for the
existence of mkfifoat() before trying to call it.

Extend the build script and workflow to automatically apply patches in
the root of the repository to the fetched source and reference the
number of patches in the version number of the release.
ribbons added a commit to ribbons/android-rsync that referenced this pull request May 21, 2026
Compilation of v3.4.3 fails due to mkfifoat() being referenced but it is
not available on Android until API level 23 (we are targeting 21 and
above).

Add patch (submitted at RsyncProject/rsync#901
for the consideration of upstream) to test specifically for the
existence of mkfifoat() before trying to call it.

Extend the build script and workflow to automatically apply patches in
the root of the repository to the fetched source and reference the
number of patches in the version number of the release.
@tridge
Copy link
Copy Markdown
Member

tridge commented May 23, 2026

@ribbons I'm planning to have android builds as part of the main rsync repo, both normal builds and specific termux deb pkgs. Are you interested in helping with that? I'd like android to be tested in CI to ensure it doesn't bitrot

@ribbons
Copy link
Copy Markdown
Author

ribbons commented May 23, 2026

@tridge That sounds great! Sure thing - happy to help (though with the caveat that I've not used Termux in anger before)!

If you're happy to add another third-party action, I've had pretty good results using
ReactiveCircus/android-emulator-runner
within Actions and I'm guessing with some fiddling it should then be possible to run the test suite within the emulator as part of the CI.

On the topic of this PR, do you think this is the right approach or is it getting the correct result the wrong way? I was a bit on the fence before but seeing your workaround in 8839314 made me think it might be better to adjust configure.ac to automatically set HAVE_SOCKETPAIR, MKNOD_CREATES_FIFOS and MKNOD_CREATES_SOCKETS when cross-compiling and the target is android ? That would then both fix this specific issue and give the correct feature detection for anyone downstream performing builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants